local dewdrop = AceLibrary("Dewdrop-2.0")

local options = {
	type='group',
		args = {
			msg = {
            type = 'text',
            name = 'msg',
            desc = 'The message text to be displayed',
            usage = "<Your message here>",
            get = "GetMessage",
            set = "SetMessage",
        },
			Test = {
				type = "execute",
				name = "Test",
				desc = "TestFunc",
				func = "Test",
				-- func = function() Scrapboard:Test() end
			},
		},
	}


Scrapboard = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceConsole-2.0", "AceDB-2.0")
Scrapboard:RegisterDB("Scraboard")
Scrapboard:RegisterChatCommand("/scrapboard", "/sb", options)

Scrapboard.message = ""

-- -----------------------
-- EVENT HANDLERS
-- -----------------------

function Scrapboard:OnEnable()
	self:Print("Scrapboard Enable")
end

-- -----------------------
-- MAIN FUNCTIONS
-- -----------------------

function Scrapboard:Test(args)
	self:print(args[1])
	for x=1, 5 do
		self:Print("Test"..x)
	end
end

function Scrapboard:GetMessage()
	return self.message
end

function Scrapboard:SetMessage(msg)
	self.message = msg
end
-- -----------------------
-- UTILITY FUNCTIONS
-- -----------------------